<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.spoto.oa.dao.impl.ProductDaoImpl" isELIgnored="false"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<script type="text/javascript" src="js/lib/jquery-1.4.2.js"></script>
		<script type="text/javascript" src="js/lib/jquery.validate.js"></script>
		<script src="js/common/form.js" type="text/javascript"></script>
		<script type='text/javascript' src='dwr/interface/ProductServImpl.js'></script>
		<script type='text/javascript' src='dwr/engine.js'></script>
		<script type='text/javascript' src='dwr/util.js'></script>
		<script src="js/product/add_product.js" type="text/javascript"></script>
		<script type="text/javascript" src="js/ckeditor/ckeditor.js"></script>
		<link href="style/common/form.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
			ul li{
				list-style:none
			}
		</style>
	</head>
	<body>
		<h1>
			修改产品信息
		</h1>
		<form action="ProductServlet" class="form" method="post">
			<input type="hidden" name="code_hidden"	value="${product.code}" />
			<input type="hidden" name="id"	value="${product.id}" />
			<div class="must">
				必填:
				<br>
				<hr>
				<ul>
					<li>
						产品编号:
						<input type="text" name="code" id="code" value="${product.code}" />						
					</li>
					<li>
						产品名称:
						<input type="text" name="name" value="${product.name}" />
					</li>
					<li>
						产品类型:
						<select name="type">
							<%
								
								ProductDaoImpl proDao=new ProductDaoImpl();
								List<String> types=proDao.getType();
								for(int i=0;i<types.size();i++){
							 %>
									<option>
										<%=types.get(i) %>
									</option>
							<%
								}
							%>
						</select>										
					</li>
					<li>
						进价:	
						<input type="text" name="price" value="${product.price}" />					
					</li>
					<li>
						销售价格:
						<input type="text" name="salesPrice" value="${product.salesPrice}" />					
					</li>
					<li>
						浮动价格:
						<input type="text" name="floatPrice" value="${product.floatPrice}" />					
					</li>
					<li>
						提供产商:
						<input type="text" name="company" value="${product.company}" />
					</li>					
				</ul>
			</div>
			<div class="other">
				<br>
				选填:
				<hr>
				<ul>					
					<li>
						产品备注:
						<textarea name="remarks">${product.remarks}</textarea>
					</li>

				</ul>
			</div>
			<ul>
				<li>
					<input type="submit" name="submit" value="提交" />
					<input type="reset" name="reset" value="重置" />
				</li>
			</ul>
		</form>
	</body>
</html>